package MyBlog.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import MyBlog.biz.UserBiz;
import MyBlog.dao.UserDao;
import MyBlog.entity.User;

@Service("userBiz")
public class UserBizImpl implements UserBiz {

	@Autowired
	private UserDao userDao;
	
	public List<User> getUserByVisitTimes(int pageSize) {
		return userDao.getUserByVisitTimes(pageSize);
	}

	@Override
	public User checkLogin(String username, String password) {
		return userDao.checkLogin(username, password);
	}

	@Override
	public User fetchUserById(int id) {
		return userDao.fetchUserById(id);
	}

	@Override
	public void update(User user) {
		userDao.update(user);
	}

}
